<?php

namespace App\Models\Article;

use App\Models\BaseModel;

/**
 *
 *
 * Class Article
 * @package App\Models\Article
 */
class ArticleClassify extends BaseModel
{
    /**
     * The table associated with the model.
     *
     * @var string
     */
    protected $table = 'article_classify';

    /**
     * Indicates if the model should be timestamped.
     * @var bool
     */
//    const CREATED_AT = 'create_time';
//    const UPDATED_AT = 'update_time';

    public $timestamps = false;

    public $appends = ['belong_to_text'];

    public $belong_to = [0 => '全部显示', 1 => 'App', 2 => 'PC'];

    public function getBelongToTextAttribute()
    {
        return $this->belong_to[$this['belong_to']];
    }

}
